home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / HyperCuber Source / HyperCuber 2.0 Source.sit / HyperCuber 2.0 Source / CGraphic.h < prev    next >
Text File  |  1994-05-02  |  2KB  |  69 lines

  1. //|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. //| This file contains the interface to the Graphic class.  A Graphic
  3. //| is a graphics object made of graphics primitives.
  4. //|________________________________________________________________________________
  5.  
  6. #pragma once
  7. #include <CList.h>
  8. #include <iostream.h>
  9.  
  10. CLASS CHyperCuberPane;
  11.  
  12. class CGraphic : public CObject
  13.     {
  14.     
  15.  
  16.     CList    *rotation_matrices;                //  The rotation matrices.  The nth element in this
  17.                                             //    list is a handle to the rotation matrix used
  18.                                             //    to rotate n-space.
  19.  
  20.     CList    *stereo_matrices;                //  This is the list of rotation matrices used for
  21.                                             //    the second image used in stereo.  Note that all
  22.                                             //    the matrices except the 3D->2D matrix are aliases
  23.                                             //    of the matrices in the "rotation_matrices" list.
  24.  
  25.     long    **perspective_params;            //  The perspective paramaters.  The nth element in
  26.                                             //    this array is the perspective parameter for
  27.                                             //    n-space (a long).
  28.                                             
  29.     CList    *angles;                        //  The sines of the viewing angles.  These are lists
  30.  
  31.   public:
  32.  
  33.     CList    *primitives;                    //  The primitives.  This is a list of primitives
  34.     CList    *colors;                        //  The colors.  This is a list of handles to RGBColors
  35.  
  36.     long    num_vertices;                    //  Number of vertices in the graphic
  37.     CList    *vertices;                        //  The vertices.  This is a list of handles to matrices;
  38.                                             //    each of the matrices contains a sequence of points
  39.                                             //    of dimension n, where n is the index of the
  40.                                             //    matrix into the vertices list.
  41.                                             
  42.     CList    *stereo_vertices;                //  This is the vertices list used to project and draw
  43.                                             //    the second image used in stereo.  Note that all
  44.                                             //    vertex lists except the 2D and screen lists are
  45.                                             //    aliases of those in the "vertices" list.
  46.                                             
  47.     long    dimension;                        //  Dimension of this graphic
  48.  
  49.     CHyperCuberPane    *pane;                    //  The pane this graphic is in
  50.  
  51.     void    IGraphic(void);
  52.     void    Dispose(void);
  53.     void    Draw(void);
  54.     void    SetupGraphic(long n);
  55.     void    ClearDrawingArea(RGBColor *color);
  56.     
  57.     void    OffsetAngle(long dimension, long angle, double offset);
  58.     void    ChangeAngle(long dimension, long angle, double value);
  59.     void    ChangePerspective(long dimension, long perspective);
  60.     
  61.     void    SwitchToStereo(void);
  62.  
  63.     void    Project(long n);
  64.     void    FitToPane(void);
  65.     
  66.     friend istream& operator>> (istream& s, CGraphic& graphic);
  67.  
  68.     };
  69.